Initial Setup on GitHub

Initial Setup in RStudio Cloud

Click down arrow next to “New Project” button and select New Project from Git Repo.

Start a New Project in RStudio Cloud

Once inside the project, you need to run the following inside the Terminal panel once for each new project. The Terminal panel is in the same pane as the Console panel. Switch to the Terminal panel:

Type this (replacing you@example.com with your actual email address)

git config --global user.email "you@example.com"

and hit enter, then type this (replacing Your Name with your actual name)

git config --global user.name "Your Name"

and hit enter in the Terminal panel.

committing a Change

pushing a Change

Checking Your status

Adding Yet Another File

Steps so you don’t have to enter your username and password every time you push / pull from GitHub

Taken from here.

In RStudio Cloud, inside the Project associated with GitHub project, go to Tools > Global Options..., select Git / SVN, and click Create RSA Key...

Click “View public key”.

Copy the public key to your clipboard.

Go to github.com, and click on your Profile Image in top right hand corner, and select Settings.

Select SSH and GPG Keys option from left menu.

Click the New SSH Key button.

Paste the public key in your clipboard into the “Key” text field.

Navigate back to your RStudio Cloud project and go to the Terminal panel on the bottom pane of your window.

In the Terminal panel, type the following, replacing YourUsername and YourRepo with your Github username and Github repository name (as it is written in your Github repository URL):

git config remote.origin.url git@github.com:YourUsername/YourRepo

You’re all set!